package org.nf.web.common.converter;

import org.nf.web.common.TypeConverter;

/**
 * @Author lzp
 * @Date 2024-05-07
 */
public class CharacterConverter implements TypeConverter {
    @Override
    public boolean supports(Class<?> type) {
        return type.equals(Character.class) || type.equals(Character.TYPE);
    }

    @Override
    public Object convert(String requestParam) {
        return requestParam.charAt(0);
    }

}
